package com.study.modules.sys.model.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.study.common.validate.Update;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 菜单
 * @Author Mr.Du
 * @Date 2021/10/18 11:28
 */
@Data
@TableName("sys_menu")
public class SysMenu {
    @Valid
    @NotNull(message = "菜单id为空",groups = Update.class)
    @NotBlank(message = "菜单id为空",groups = Update.class)
    public Long id;
    @Valid
    @NotNull(message = "父级信息不能空！")
    @NotBlank(message = "父级信息不能空！")
    public Long parentId;
    @Valid
    @NotNull(message = "菜单名不能空！")
    @NotBlank(message = "菜单名不能空！")
    public String name;
    @Valid
    @NotNull(message = "菜单类型不能空！")
    @NotBlank(message = "菜单类型不能空！")
    public Integer type;
    public String path;
    public String router;
    public String perms;
    public String icon;
    @Valid
    @NotNull(message = "菜单排序不能空！")
    @NotBlank(message = "菜单排序不能空！")
    public Integer sort;
    public Integer status;
    @Valid
    @NotNull(message = "菜单是否显示不能空！")
    @NotBlank(message = "菜单是否显示不能空！")
    public Integer isShow;
    public Integer deleted;
    public Long createId;
    public Date createTime;
    public Long updateId;
    public Date updateTime;
}
